library("firatheme")
library("ggplot2")

# load data
load("~/df_replication_A.RData")

ggplot(df_municipalities) +
  geom_polygon(aes(x = lng, y = lat, group = area), fill = "gray80",
               color = "black", size = 0.05, show.legend = FALSE) +
  theme_fira() +
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())


ggplot(df_regions) +
  geom_polygon(aes(x = lng, y = lat, group = area, fill = regionnavn ),
               color = "gray20", size = 0.01, alpha = 0.5, show.legend = T) +
  theme_fira() + 
  theme(text = element_text(size=8), legend.position = c(0.8, 0.8), legend.text = element_text(size=10), legend.title = element_blank(),
        panel.grid.major = element_blank(), panel.grid.minor = element_blank()) +
  scale_fill_discrete(name = "", labels = c("Hovedstaden", "Midtjylland", "Nordjylland", "Sjælland", "Syddanmark")) 


ggplot(df_municipalities) +
  geom_polygon(aes(x = lng, y = lat, group = area, fill = diff),
               size = 0.05, show.legend = TRUE) +
  scale_fill_gradientn(colours=topo.colors(7),na.value = "transparent",
                       breaks=c(-2.5,-1.25,0,1.25,2.5), name = "",
                       limits=c(-2.5,2.5)) + 
  theme_fira() +
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), legend.position = c(0.8, 0.8))


ggplot(df_regions) +
  geom_polygon(aes(x = lng, y = lat, group = area, fill = diff),
               size = 0.05, show.legend = TRUE) +
  scale_fill_gradientn(colours=topo.colors(7),na.value = "transparent",
                       breaks=c(-2.5,-1.25,0,1.25,2.5), name = "",
                       limits=c(-2.5,2.5)) + 
  theme_fira() +
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), legend.position = c(0.8, 0.8))
